Search found 565 matches
- Sat Feb 25, 2017 7:17 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
You probably want: glEnable(GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); This mixes the image you draw with the background by calculating new_color * alpha + background_color * (1-alpha) So when your new color has alpha of 1 it is fully visible. If its alpha is 0 the background is ...
- Sat Feb 25, 2017 3:27 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
I've written a tutorial for you here: http://dcemulation.org/?title=Loading_P ... L_textures
It makes direct use of libpng.
Hope that makes stuff easier for you.
It makes direct use of libpng.
Hope that makes stuff easier for you.
- Sat Feb 25, 2017 3:27 pm
- Forum: Programming Discussion
- Topic: Wiki feedback
- Replies: 102
- Views: 76376
Re: Wiki feedback
I've separated the "Graphics" section into general, PVR and OpenGL.
I"ve also added the tutorial "Loading PNG images as OpenGL textures" to the OpenGL section: http://dcemulation.org/?title=Loading_P ... L_textures
I"ve also added the tutorial "Loading PNG images as OpenGL textures" to the OpenGL section: http://dcemulation.org/?title=Loading_P ... L_textures
- Sat Feb 25, 2017 12:17 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
Loading a texture in OpenGL consists of two phases. 1. Loading the image file into memory. You have the compressed PNG image and you want to parse information like its dimensions, color format and get an array of pixel values. So you fopen the file and parse it according to PNG file specifications. ...
- Fri Feb 24, 2017 5:39 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
Code: Select all
uint32 w, h;
png_load_texture("/rd/logo.png", &logo,PNG_MASK_ALPHA,&w,&h);
// w and h now contain the dimensions of logo.png
glTexImage2D(...w, h, ...)
- Fri Feb 24, 2017 3:26 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
int png_load_texture(const char *filename, pvr_ptr_t *tex, uint32 alpha, uint32 *w, uint32 *h); Those are pointers to the dimensions, not immediate values. The function stores the dimensions of the image there, you're not supposed to use them as input. The compiler should have told you about this. ...
- Thu Feb 23, 2017 5:42 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
Please look at my edit, I think you missed it.
I think that function is part of the old OpenGL implementation, but it was taken out in the implementation by Ph3nom, which is standard now. (no such function exists in standard OpenGL)
I think that function is part of the old OpenGL implementation, but it was taken out in the implementation by Ph3nom, which is standard now. (no such function exists in standard OpenGL)
- Thu Feb 23, 2017 5:06 pm
- Forum: Programming Discussion
- Topic: PNG Textures dont work anymore
- Replies: 18
- Views: 1420
Re: PNG Textures dont work anymore
Make sure you sourced the environ file source /opt/toolchains/dc/kos/environ.sh Then make sure -lGL is linked in your Makefile. EDIT: actually I think this function was deprecated and removed in the newer OpenGL implementation for KOS. I think you should just use glTexImage2D instead like you would ...
- Wed Feb 22, 2017 10:53 am
- Forum: Programming Discussion
- Topic: Wiki feedback
- Replies: 102
- Views: 76376
Re: Wiki feedback
I've added "Video: Hardware Architecture Breakdown" to the general section, links to https://www.youtube.com/watch?v=1_XhD5Msurc
- Wed Feb 22, 2017 8:22 am
- Forum: Programming Discussion
- Topic: _asm Anomaly
- Replies: 8
- Views: 1042
Re: _asm Anomaly
@AtariOwl: As far as I remember the floating point registers aren't preserved at all so you have to push and pop all registers that you use, even if you use asm in a C function (gcc will preserve r0-r7 but not any fr). If you want to learn about assembly programming I think this is a nice project, b...
- Tue Feb 21, 2017 9:51 am
- Forum: Programming Discussion
- Topic: _asm Anomaly
- Replies: 8
- Views: 1042
Re: _asm Anomaly
Post code please. And the matrix functions in kos use assembly, so you shouldn't notice any performance difference.
- Tue Feb 21, 2017 9:50 am
- Forum: Programming Discussion
- Topic: Problem with KOS instal. (MSYS2)
- Replies: 2
- Views: 415
Re: Problem with KOS instal. (MSYS2)
Did you install to a different partition than "C:\"? There are reports that git doesn't output anything when it's installed to "D:\" etc.
- Sun Feb 19, 2017 4:31 pm
- Forum: Programming Discussion
- Topic: *ONE* KOS Error: libbz2 validation error
- Replies: 15
- Views: 2586
Re: *ONE* KOS Error: libbz2 validation error
Ah yeah I remember now.. if you use the mingw shell instead it should work according to someone else, in which case I'll correct that note in the wiki.. I just never got any confirmation and don't know whether the list of packages changes. I also don't use Windows so I rely on reports
- Sat Feb 18, 2017 4:01 pm
- Forum: Programming Discussion
- Topic: *ONE* KOS Error: libbz2 validation error
- Replies: 15
- Views: 2586
Re: *ONE* KOS Error: libbz2 validation error
You should run . /opt/toolchains/dc/kos/environ.sh to have the environment variables set again. Regarding genromfs, atariowl wanted to work on this a bit, but I don't know whether he had any success. He used a downloaded executable as a workaround http://dcemulation.org/phpBB/viewtopic.php?f=29&...
- Fri Feb 17, 2017 11:21 am
- Forum: /dev/null
- Topic: Dear "Great" Britain:
- Replies: 4
- Views: 2639
Re: Dear "Great" Britain:
I think it's mostly an issue of bad ports. Those old game engines were just tied to the frame rate instead of a proper timer, so the physics/animation/sound depends on the screen refresh rate, which is actually absolutely unnecessary. The problem was not that things moved only 50 times per second in...
- Fri Feb 17, 2017 9:30 am
- Forum: Programming Discussion
- Topic: *ONE* KOS Error: libbz2 validation error
- Replies: 15
- Views: 2586
Re: *ONE* KOS Error: libbz2 validation error
Thanks for the compliment! BlueCrab should be able to help with that better than me. However, if you're not using libbz in your game you can just build the ports that you need for you game, if any, and start development already. If you don't use libbz in your game you don't need this port. You also ...
- Sat Feb 04, 2017 10:51 am
- Forum: Front Page News and Forum Guidelines
- Topic: In The Line Of Fire - Kickstarter Launched!
- Replies: 35
- Views: 31265
Re: In The Line Of Fire - Kickstarter Launched!
Oh my god please don't say thatgameblabla wrote:Maybe he died for real...
- Sat Jan 28, 2017 5:54 am
- Forum: Programming Discussion
- Topic: Wiki feedback
- Replies: 102
- Views: 76376
Re: Wiki feedback
MSYS would work fine with genromfs if you were to compile it with the MSYS toolchain rather than the MinGW one (considering MSYS is basically Cygwin anyway). Installing the "gcc" package with the MSYS2 pacman should install the MSYS toolchain, if I'm understanding how that is set up corre...
- Thu Jan 26, 2017 10:54 am
- Forum: Programming Discussion
- Topic: -bash: kos-cc: command not found
- Replies: 5
- Views: 632
Re: -bash: kos-cc: command not found
This is the tutorial I made including an install script. It's based on MSYS2 instead of Cygwin: http://dcemulation.org/?title=Compiling_KOS_on_Windows
I have never tried the tutorial you're using.
I have never tried the tutorial you're using.
- Tue Jan 24, 2017 10:19 pm
- Forum: Programming Discussion
- Topic: vqenc/Opaque/Transluscent Polys (Zsortingt
- Replies: 3
- Views: 504
Re: vqenc/Opaque/Transluscent Polys (Zsortingt
VQ compression quality looks bad on pictures with very many colors. It's therefore more likely in images of large resolution. Note that most of your textures will not span the whole screen, but just a smaller portion of it. It makes no sense to use a 1024x1024 texture if it's just going to be applie...