Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing glCopyTexSubImage2D and glCopyTexImage2D #79

Open
Fancy2209 opened this issue Nov 4, 2024 · 3 comments
Open

Missing glCopyTexSubImage2D and glCopyTexImage2D #79

Fancy2209 opened this issue Nov 4, 2024 · 3 comments

Comments

@Fancy2209
Copy link

Fancy2209 commented Nov 4, 2024

Bug Report

What's the issue you encountered?

I am working on a port of Sonic Robo Blast 2 2.1.25, I attemtped to build it with the OpenGL Renderer on since this version seemed old enough for GL 1.1, but noticed that the linker fails
From the output it seems that these 2 missing functions are the culprits:

  • glCopyTexSubImage2D
  • glCopyTexImage2D
    I feel it'd make sense to either, implement them, stub them, or temporarily comment them out of the GL headers so it's easier to catch they're missing.
    Linker Output:
Linking srb2wii.elf...
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ../objs/Wii/SDL/Release/r_opengl.o: in function `StartScreenWipe':
/home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2235:(.text.StartScreenWipe+0x6c): undefined reference to `glCopyTexSubImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2230:(.text.StartScreenWipe+0x130): undefined reference to `glCopyTexImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ../objs/Wii/SDL/Release/r_opengl.o: in function `EndScreenWipe':
/home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2275:(.text.EndScreenWipe+0x6c): undefined reference to `glCopyTexSubImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2270:(.text.EndScreenWipe+0x130): undefined reference to `glCopyTexImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ../objs/Wii/SDL/Release/r_opengl.o: in function `MakeScreenTexture':
/home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2479:(.text.MakeScreenTexture+0x6c): undefined reference to `glCopyTexSubImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2474:(.text.MakeScreenTexture+0x130): undefined reference to `glCopyTexImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ../objs/Wii/SDL/Release/r_opengl.o: in function `MakeScreenFinalTexture':
/home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2518:(.text.MakeScreenFinalTexture+0x6c): undefined reference to `glCopyTexSubImage2D'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /home/paulo/SRB2Wii/src/hardware/r_opengl/r_opengl.c:2513:(.text.MakeScreenFinalTexture+0x130): undefined reference to `glCopyTexImage2D'
collect2: error: ld returned 1 exit status
make: *** [Makefile:635: ../bin/Wii/Release/srb2wii.elf] Error 1

How can the issue be reproduced?

Try to link an app using glCopyTexSubImage2D, or glCopyTexImage2D
For example /~https://github.com/Fancy2209/SRB2Wii
(to build cd to the src dir and run make WII=1)

Environment?

endeavourOS, I do use a unnoficial wii-curl package but it is not related to the issue here

Additional context?

[N/A]

@WinterMute
Copy link
Member

As amazing though @mardy's work here is, opengx is still very much a work in progress and there are still features missing. These functions are not yet implemented but will be in time /~https://github.com/devkitPro/opengx/blob/master/src/functions.c#L104-L107

@mardy
Copy link
Collaborator

mardy commented Nov 7, 2024

Oh, it turns out I was not subscribed to this project's issues, so thanks @WinterMute for mentioning me :-)

@Fancy2209, indeed, the functions are not implemented yet, but I believe that it shouldn't be too hard to come up with a quick implementation using glReadPixels+glTex(Sub)Image2D. You could give it a try, if you don't want to wait for me :-)

@Fancy2209
Copy link
Author

Oh, it turns out I was not subscribed to this project's issues, so thanks @WinterMute for mentioning me :-)

@Fancy2209, indeed, the functions are not implemented yet, but I believe that it shouldn't be too hard to come up with a quick implementation using glReadPixels+glTex(Sub)Image2D. You could give it a try, if you don't want to wait for me :-)

And it seems github never notified me of your reply!
yeah that seems simple enough, will try and post results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants