Search found 141 matches

by kazade
Wed Aug 08, 2018 5:38 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

What's the layout for mipmap data that the PVR expects? Is it base level, followed by the smaller levels (e.g. 256x256, then 128x128, 64x64 etc.) or is it some other ordering?
by kazade
Wed Aug 08, 2018 3:52 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

OK for now I've gone with comparing the calculated uncompressed size with the actual data size and making a guess based on the ratio: https://github.com/Kazade/GLdc/blob/master/GL/texture.c#L227 glCompressedTexImage2D now works great. It supports compressed, twiddled and mipmapped formats. Sample he...
by kazade
Tue Aug 07, 2018 3:09 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

OK so here's an interesting conundrum... I've been working on glCompressedTexImage2D and use a "DTEX" compressed image for testing. I have it working for non-mipmapped tex files, but if the texture has mipmap data I have two options: 1. Throw an error. The user should upload each level individually ...
by kazade
Mon Aug 06, 2018 1:13 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

You got a sample texture file for me to test with? I'll see what I can do :)
by kazade
Mon Aug 06, 2018 1:27 am
Forum: Programming Discussion
Topic: NullDC Flicker when Compiling Parallax Examples
Replies: 3
Views: 276

Re: NullDC Flicker when Compiling Parallax Examples

FWIW I see the same flickering on NullDC running under WINE on Linux. I thought it might have been a bug in my OpenGL library but apparently not!
by kazade
Sat Aug 04, 2018 2:13 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

Excellent! I've made good progress on multitexture, just need to write a good test sample for it and then fix up any breakage. *Update* Just pushed a completely untested multitexture implementation. I'll test and improve tomorrow. https://github.com/Kazade/GLdc/commit/6942e597f4f2f8983d463b6358a069e...
by kazade
Fri Aug 03, 2018 4:17 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

Interesting, thanks!

I don't suppose you know how I can view the compiled ASM for a function? I could really do with being able to see what functions are being compiled down to.
by kazade
Fri Aug 03, 2018 6:20 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

Cool, OK I'll make sure I prefix non static functions with _gl. I've got a bug to fix in lighting, and then I'll shove in multitexture support. I could really use someone who understands the SH4/PVR to look over my code and suggest performance improvements. At the moment: - I only send polygon heade...
by kazade
Thu Aug 02, 2018 2:18 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

I think it might be an idea to ship it in kos-ports alongside libGL (e.g. libGLdc + /usr/include/GLdc/gl.h). Simply because it will avoid ambiguity of which version someone is using, and also, GLdc won't be exactly compatible (it has different header constants and glKosSwapBuffers() instead of glut ...
by kazade
Tue Jul 31, 2018 2:36 pm
Forum: Programming Discussion
Topic: How to enable flat shading?
Replies: 1
Views: 220

Re: How to enable flat shading?

Ah, it seems to be lxdream :/
by kazade
Tue Jul 31, 2018 1:13 pm
Forum: Programming Discussion
Topic: How to enable flat shading?
Replies: 1
Views: 220

How to enable flat shading?

GLdc implements glShadeModel(GL_FLAT) in the same way that libGL did; by setting `cxt.gen.shading = PVR_SHADE_FLAT`, but it doesn't seem to work.

As far as I can tell the output is the same as PVR_SHADE_GOURAUD.

Any ideas?
by kazade
Sun Jul 29, 2018 10:48 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

Re: GLdc - Call for testers!

Well GLdc is ready for use aside from the caveats listed in the README and the issues here: https://github.com/Kazade/GLdc/issues I've basically done the hard-slog 80% but need help to get the final 20% done. The key missing feature you'll probably find is multitexturing isn't there yet, neither is ...
by kazade
Sat Jun 16, 2018 8:09 am
Forum: Programming Discussion
Topic: A bunch of sound questions...
Replies: 1
Views: 461

A bunch of sound questions...

I'm looking into implementing DC sound support in my game engine, and after digging around in the SDK docs I have a bunch of questions: 1. You can only create 4 streams (SND_STREAM_MAX), is that because you can only play 4 sounds simultaneously? 2. What's the advantage of using the sfx stuff over st...
by kazade
Sat Jun 09, 2018 10:35 am
Forum: Programming Discussion
Topic: Questions about Perspective Divide + Z-Clipping
Replies: 5
Views: 733

Re: Questions about Perspective Divide + Z-Clipping

Yeah FWIW your complaints about libGL influenced my decision to write a new one. Mine focuses on memory usage and correctness over performance (for now). Hopefully I can solve these issues there. Maybe.
by kazade
Thu Jun 07, 2018 11:27 am
Forum: Programming Discussion
Topic: Questions about Perspective Divide + Z-Clipping
Replies: 5
Views: 733

Re: Questions about Perspective Divide + Z-Clipping

Thanks! Glad to see you back 111 :)

I'll do some playing around, but if anyone else stumbles on this topic this is the best explanation of perspective division that I've found: http://www.learnopengles.com/tag/perspective-divide/
by kazade
Wed Jun 06, 2018 1:46 pm
Forum: Programming Discussion
Topic: Questions about Perspective Divide + Z-Clipping
Replies: 5
Views: 733

Questions about Perspective Divide + Z-Clipping

I'm working on the last major piece in my new GL implementation which is near-Z clipping, and I could use a bit more understanding about perspective division, and the Dreamcast coordinate system. I'm looking at the coordinates generated by libGL after perspective division. What I'd expect is that th...
by kazade
Tue Jun 05, 2018 10:03 am
Forum: Programming Discussion
Topic: Shadows/Lights example?
Replies: 14
Views: 2322

Re: Shadows/Lights example?

Yeah that's what I meant :)

BlueCrab, is it theoretically possible to render to any power-of-two texture size with the PVR (if KOS was extended to support it)? Or is it a limitation of the hardware that it must render at the screen resolution (to a texture at the next power-of-two)
by kazade
Mon Jun 04, 2018 1:25 am
Forum: Programming Discussion
Topic: Shadows/Lights example?
Replies: 14
Views: 2322

Re: Shadows/Lights example?

Presumably they simply render the player model once per light to a texture then render an additional pass of the scene with that texture bound. The one thing that puzzles me though is the resolution. The KOS docs say this: "This function currently only supports outputting at the same size as the act...
by kazade
Tue May 29, 2018 12:33 am
Forum: Programming Discussion
Topic: What do src_enable/dst_enable do?
Replies: 3
Views: 526

Re: What do src_enable/dst_enable do?

I had no idea the Dreamcast had an accumulation buffer! Nice!
by kazade
Mon May 28, 2018 4:21 am
Forum: Programming Discussion
Topic: What do src_enable/dst_enable do?
Replies: 3
Views: 526

What do src_enable/dst_enable do?

In my OpenGL implementation I instinctively enabled these flags when blending was enabled, but this caused lxdream to start complaining about something being unsupported. Then I realised that libgl doesn't set these flags and blending works fine without enabling them (leaving them zeroed) and that s...