Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/redorav/ddspp
Browse files Browse the repository at this point in the history
  • Loading branch information
redorav committed Feb 20, 2023
2 parents 510d812 + d6a8baf commit 14c2455
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018
Copyright (c) 2018-2023 Emilio López

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ const char* ddsData = ...

// Decode header and get pointer to initial data
ddspp::Descriptor desc;
ddspp::decode_header(ddsData, desc);
const char* initialData = ddsData + desc.headerSize;
ddspp::Result decodeResult = ddspp::decode_header(ddsData, desc);

// Feed to the graphics API
if(initialData)
if(decodeResult == ddspp::Success)
{
const char* initialData = ddsData + desc.headerSize;

// D3D example
{
D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
Expand Down

0 comments on commit 14c2455

Please sign in to comment.