Search found 141 matches

by kazade
Sun May 20, 2018 10:29 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 6544

GLdc - Call for testers!

Hi everyone! Over the last few months I've been maintaining a custom fork of libGL, but a few weeks ago I hit a corruption bug that I couldn't solve and decided to essentially tear the whole thing apart and put it back together again :grin: So, now it's *mostly* back together and it lives here: http...
by kazade
Sun May 20, 2018 10:29 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 0
Views: 138

GLdc - Call for testers!

Hi everyone! Over the last few months I've been maintaining a custom fork of libGL, but a few weeks ago I hit a corruption bug that I couldn't solve and decided to essentially tear the whole thing apart and put it back together again :grin: So, now it's *mostly* back together and it lives here: http...
by kazade
Thu May 17, 2018 12:45 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

Yeah that's true, I can't explain why all the values got set to 1.0f, but it only happened when I tested with those two macros so I imagine it's related.

Thanks for applying the fixes, I'll update my SDK and see if it fixes things.
by kazade
Wed May 16, 2018 9:10 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

I'll give that a go, but FWIW I'm 90% sure it'll work because mat_trans_single4 worked and that uses fr0-fr4. I wonder why there's such a mixture between the two sets of registers in those macros... EDIT: I think this is the problem! https://wiki.osdev.org/Inline_Assembly#Clobbered_Registers_List ht...
by kazade
Tue May 15, 2018 10:45 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

OK there is definitely something funny about mat_trans_single3_nodiv. If I move the call to a function like this: void transform_to_eye_space(GLfloat* point) { _glKosMatrixLoadModelView(); mat_trans_single3_nodiv(point[0], point[1], point[2]); } ...snip... GLfloat contribution [] = {0.0f, 0.0f, 0.0f...
by kazade
Mon May 14, 2018 1:34 pm
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

OK the weirdness continues... I can comment out either mat_trans_single4_nodiv *OR* the call to calculateLightingContribution, and the result goes back to the correct 0,0,0,0.

:(
by kazade
Mon May 14, 2018 1:31 pm
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

OK so I've narrowed it down to mat_trans_single3_nodiv_nomod. If I comment that line out, everything works as expected. If I replace it with mat_trans_single3_nodiv, or mat_trans_single3_nodivw it's still broken (contribution == 1,1,1,1) , but if I switch it with mat_trans_single4 then the contribut...
by kazade
Mon May 14, 2018 11:39 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

OK so here's a fun one that someone might be able to help me with: /* We ignore diffuse colour when lighting is enabled. If GL_COLOR_MATERIAL is enabled * then the lighting calculation should possibly take it into account */ GLfloat contribution [] = {0.0f, 0.0f, 0.0f, 0.0f}; GLfloat to_add [] = {0....
by kazade
Mon May 14, 2018 1:21 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

Oh also the new stuff is in the GL folder, everything outside that is stuff I haven't cleaned up yet or deleted.
by kazade
Mon May 14, 2018 12:53 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

Ok cool! In the meantime if anyone wants to test it or help me out, I'm working in the experimental branch here: https://github.com/Kazade/libgl/tree/experimental?files=1 Things that aren't implemented yet: multitexture, near z clipping, lighting, fog, framebuffers Immediate mode needs some work, bu...
by kazade
Sun May 13, 2018 3:01 am
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Re: Blending polys in the TR list

OK ignore me, it's because diffuse colour should be ignored when GL_LIGHTING is enabled (unless GL_COLOR_MATERIAL is involved). I've fixed that and now everything works.

I'll post back when my new libGL is ready to use.
by kazade
Sat May 12, 2018 2:57 pm
Forum: Programming Discussion
Topic: Blending polys in the TR list
Replies: 13
Views: 1052

Blending polys in the TR list

Hi! I've been busy refactoring libGL in my custom fork, and I'm experiencing a blending issue which also occurred in the upstream version, and I'm not sure I understand what's happening. Basically I have the following set of rendering steps: 1. Render a textured cube with alpha blending enabled 2. R...
by kazade
Sat Nov 25, 2017 1:26 am
Forum: Programming Discussion
Topic: Matrix functions having no effect?
Replies: 1
Views: 427

Matrix functions having no effect?

For some reason I can't get any of the mat_trans functions to affect the output... vout.x = (float) *(ptr++); vout.y = (float) *(ptr++); vout.z = (float) (VERTEX_POINTER.size > 2) ? *(ptr++) : 0; mat_load(&MODELVIEW_STACK.top().m); mat_trans_single3_nodiv(vout.x, vout.y, vout.z); printf("%f %f %f\n"...
by kazade
Wed Nov 22, 2017 1:05 am
Forum: Homebrew Software and Indie Games Discussion
Topic: [Release] Docker KallistiOS SDK for Linux
Replies: 2
Views: 1033

Re: [Release] Docker KallistiOS SDK for Linux

Great minds think alike! https://hub.docker.com/r/kazade/dreamcast-sdk/

Awesome work, building with Docker is definitely the way to go, it makes life so much easier! :)
by kazade
Fri Sep 15, 2017 2:03 pm
Forum: Programming Discussion
Topic: [SOLVED] Issue with glDepthMask
Replies: 7
Views: 710

Re: Issue with glDepthMask

Yep it was down to the auto-sorting. I've disabled that now in my libGL fork so that the behaviour is more like traditional OpenGL.
by kazade
Fri Sep 15, 2017 11:50 am
Forum: Programming Discussion
Topic: [SOLVED] Issue with glDepthMask
Replies: 7
Views: 710

Re: Issue with glDepthMask

BlueCrab, have you ever disabled depth writes with PVR commands directly? Looking at the code it seems that the depth.write flag is correctly set when compiling the polygon header - it just doesn't seem to work.
by kazade
Fri Sep 15, 2017 7:49 am
Forum: Programming Discussion
Topic: [SOLVED] Issue with glDepthMask
Replies: 7
Views: 710

Re: Issue with glDepthMask

Has anyone ever seen glDepthMask working? I've followed the code all the way down into KOS and everything looks fine, yet it definitely seems like depth writes are happening even when I've disabled them :(
by kazade
Fri Sep 15, 2017 7:40 am
Forum: Programming Discussion
Topic: Invalid texture U size
Replies: 22
Views: 2051

Re: Invalid texture U size

Hey, FWIW I've continued adding things to my fork here: https://github.com/Kazade/libgl/commits/master Feel free to cherry-pick what you like, some of the stuff I'm doing there is pretty opinionated (e.g. the dynamically growing vertex buffer) so you might not want all of it :D Just a quick question...
by kazade
Thu Sep 14, 2017 1:33 pm
Forum: Programming Discussion
Topic: [SOLVED] Issue with glDepthMask
Replies: 7
Views: 710

Re: Issue with glDepthMask

Bump...

I'm at a loss; I can't see anything obviously wrong with the libGL code.. yet that's where the problem must lie :(
by kazade
Fri Sep 08, 2017 11:23 am
Forum: Programming Discussion
Topic: [SOLVED] Issue with glDepthMask
Replies: 7
Views: 710

[SOLVED] Issue with glDepthMask

My game engine has a GL1 renderer which runs on both the PC, and Dreamcast which lets me compare behaviour between the two. I currently am trying to render a scene that does the following: - glDepthMask(GL_FALSE); - Render a textured background quad at z == 0 - glDepthMask(GL_TRUE); - Render a textu...